![]() |
MPWaitForEvent |
||||
Header: | Multiprocessing.h | Carbon status: | Supported | |
Retrieves event flags from a specified event group.
OSStatus MPWaitForEvent ( MPEventID event, MPEventFlags *flags, Duration timeout );
The event group whose flags you want to retrieve.
On return, flags contains the flags of the specified event group. Pass NULL if you do not need any flag information.
The maximum time to wait for events before timing out. See
A result code.
This function obtains event flags from the specified event group. The timeout specifies how long to wait for events if none are present when the call is made. If any flags are set when this function is called, all the flags in the event group are moved to the flag field and the event group is cleared. This obtaining and clearing action is an atomic operation to ensure that no updates are lost. If multiple tasks are waiting on an event group, only one can obtain any particular set of flags.
If you call this function from a cooperative task, you should specify only kDurationImmediate for the timeout length; other waits will cause the task to block.
Also see the function MPSetEvent.
Introduced with Multiprocessing Services 2.0.
Supported in Carbon. Available in CarbonLib 1.0 and later when MPLibrary 2.0 or later is installed. Exported by CarbonLib 1.0 and later and by MPLibrary 2.0 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/6/2000)